home *** CD-ROM | disk | FTP | other *** search
/ NBC Slam Jams! / NBC Slam Jams!.iso / xtras / media_la / fx_set_2.fxm / 00021_Script_Initialization Scripts < prev    next >
Text File  |  1998-07-02  |  2KB  |  79 lines

  1. on startSetFX
  2.   global fxWindow
  3.   
  4.   set fxWindow = the activeWindow      
  5.   
  6.   if fxWindow = (the stage) then clearGLobals
  7.   
  8.   -- If authoring this movie, set fxWindow to the stage
  9.   if voidP(fxWIndow) then set fxWindow = the stage
  10.   
  11.   -- Set up stuff
  12.   InitGlobals
  13.   
  14.   setTextFields
  15.   
  16.   -- Go to inital frame
  17.   Dispatch
  18. end
  19.  
  20. -- Set window type and title
  21. on activateWindow
  22.   global fxWindow
  23.   if the name of the activeWindow = "add" then exit
  24.   if the windowType of the activeWindow  <> 4 then
  25.     set the windowType of the activeWindow to 4
  26.     set the modal of the activeWindow = TRUE
  27.   end if 
  28.   set the title of the activeWindow to the movieName
  29. end 
  30.  
  31. -- Forget window and tracking object
  32. on closeWindow
  33.   global fxTrackingObj, fxWindow
  34.   if objectP(fxTrackingObj) and the activeWindow = fxWindow then
  35.     set fxTrackingObj = 0
  36.   end if
  37.   forget the activeWindow 
  38. end
  39.  
  40. -- Set up tracking object and set some constants
  41. on initGlobals  
  42.   global fxDisplayMember, fxTrackingObj
  43.   
  44.   set fxDisplayMember = member "Alpha"
  45.   preload fxDisplayMember
  46.   
  47.   if not objectP(fxTrackingObj) then
  48.     set fxTrackingObj = new(script "Tracking Object")
  49.     if not objectP(fxTrackingObj) then
  50.       alert("Something is amiss.  Unable to initiate tracking")
  51.     end if
  52.   end if
  53. end
  54.  
  55. -- Determine where to go
  56. on dispatch
  57.   global fxTrackingObj
  58.   if validMember(fxTrackingObj) then
  59.     go to frame "General Member Settings"
  60.   else
  61.     go to frame "No Cast Chosen"
  62.   end if 
  63. end
  64.  
  65. on SetTextFields
  66.   put " " into field "Help Text"
  67.   repeat with i = 1 to the number of castLibs
  68.     repeat with j = 1 to the number of members in castLib i
  69.       if the type of member j of castLib i = #field then
  70.         if field j of castLib i = "" then put "--" into field j of castLib i
  71.         set the font of member j of castLib i = "Geneva"
  72.         set the fontSize of member j of castLib i = 9
  73.         set the lineHeight of member j of castLib i = 12
  74.         -- set the foreColor of member j of castLib i = textcolor(#black)
  75.       end if
  76.     end repeat
  77.   end repeat
  78. end
  79.